from rest_framework import serializers
from . import models
# class Cateserializers(serializers.Serializer):
#     name=serializers.CharField(max_length=32)
#
#     def create(self, validated_data):
#         return models.Author.objects.create(**validated_data)



class CateSerializers(serializers.ModelSerializer):
    class Meta:
        model=models.Cate
        fields='__all__'


class Booksserializers(serializers.ModelSerializer):
    class Meta:
        model=models.Books
        fields='__all__'